/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: DcmDspDid.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: Dcm
*
* Revision:
* --------------------------------------------------------------------------------
* v0.1: 
* --Yueting.Ben, 2024-03-21 
* --Initial release

**********************************************************************************/

/** HEADER FILES **/
#include "DcmDspDidCfg.h"
#include "DcmDspSvc10Cfg.h"
#include "DcmDspSvc27Cfg.h"

/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/
const DcmDspDataType DcmDspDataCfg[DCM_DSP_DATA_INDEX__MAX];
const DcmDspDidSignalType DcmDspDidSignaCfg[DCM_DSP_DID_SIGNAL_INDEX_MAX];
const DcmDspDidInfoType DcmDspDidInfoCfg[DCM_DSP_DID_INDEX_MAX];


/** LOCAL DATA **/
const DcmDspDataType DcmDspDataCfg[DCM_DSP_DATA_INDEX__MAX] = 
{
    /* DCM_DSP_DATA_INDEX_F190_DATA */
    {
        AppDiag_DID_F190_VIN_Data_ReadData, /* ReadFnc */
        AppDiag_DID_F190_VIN_Data_WriteData, /* WriteFnc */
        DCM_NULL_PROCESSOR, /* ReturnControlToEcuFnc */
        DCM_NULL_PROCESSOR, /* ResetToDefaultFnc */
        DCM_NULL_PROCESSOR, /* ShortTermAdjustmentFnc */
        17 /* data byte size */
    }
};


const DcmDspDidSignalType DcmDspDidSignaCfg[DCM_DSP_DID_SIGNAL_INDEX_MAX] = 
{
    /* ByteSize,  ByteOffset,  didDataPtr */
    {17,          0,           (DcmDspDataType*)(&DcmDspDataCfg[DCM_DSP_DATA_INDEX_F190_VIN_FIRST])}
};


const DcmDspDidInfoType DcmDspDidInfoCfg[DCM_DSP_DID_INDEX_MAX] = 
{
    /* DCM_DID_INDEX_F190 */
    {
        /* did,  didUsed, didSize */
        0xF190,  SET,     17, 
        {{(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}}, /* readAccess */
        {{(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}}, /* writeAccess */
        {{(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}}, /* controlAccess */
        (uint8)(DCM_DSP_DID_SIGNAL_INDEX_F190_MAX - DCM_DSP_DID_SIGNAL_INDEX_F190_FIRST), /* signalNum */
        (DcmDspDidSignalType*)(&DcmDspDidSignaCfg[DCM_DSP_DID_SIGNAL_INDEX_F190_FIRST])/* didDataPtr */
    }, 
};

